package com.cao;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test002 {
    @Test
    public void test0021(){
        ApplicationContext ac=new ClassPathXmlApplicationContext("shab.xml");
        work work=(work)ac.getBean("work");
        System.out.println(work);
        ((ClassPathXmlApplicationContext)ac).close();
    }
    @Test
    public void test002(){
        ApplicationContext ac=new ClassPathXmlApplicationContext("shab.xml");
        work work=(work)ac.getBean("w");
        System.out.println(work);
        ((ClassPathXmlApplicationContext)ac).close();
    }
}
